﻿using System;
using Neonode.Forms;

namespace StopWatch
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [MTAThread]
        static void Main()
        {
            string windowCaption = "C71F25F9-ECFF-4d90-93DF-D6D977CDDA72";
            using (SingleInstance instance = new SingleInstance(windowCaption))
            {
                if (instance.AlreadyRunning)
                {
                    instance.TryActivatePreviousInstance(windowCaption);
                }
                else
                {
                    FrmMain frmMain = new FrmMain();
                    frmMain.Text = windowCaption;

                    try
                    {
                        frmMain.ShowDialog();
                    }
                    catch (Exception)
                    {
                    }
                }
            }

            
        }
    }
}